package com.hz.winnie.demands.service;

import java.util.List;

import com.hz.winnie.demands.dao.DemLifeCycleDao;
import com.hz.winnie.demands.pojo.DemLifeCycle;

/**
 * @description 需求生命周期服务实现类
 * @author winnie
 * @date 2011-4-7
 * @version 1.0
 */
public class DemLifeCycleServiceImpl implements DemLifeCycleService {

    private DemLifeCycleDao demLifeCycleDao;

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.hz.winnie.demands.service.DemLifeCycleService#addLifeCycle(com.hz
     * .winnie.demands.pojo.DemLifeCycle)
     */
    @Override
    public void addLifeCycle(DemLifeCycle demLifeCycle) {
	demLifeCycleDao.create(demLifeCycle);
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.hz.winnie.demands.service.DemLifeCycleService#listLifeCycleByDemandId
     * (int)
     */
    @Override
    public List<DemLifeCycle> listLifeCycleByDemandId(int demandId) {
	DemLifeCycle demLifeCycle = new DemLifeCycle();
	demLifeCycle.setDemId(demandId);
	List<DemLifeCycle> list = demLifeCycleDao
		.listLifeCycleByDemandId(demLifeCycle);
	return list;
    }

    public DemLifeCycleDao getDemLifeCycleDao() {
	return demLifeCycleDao;
    }

    public void setDemLifeCycleDao(DemLifeCycleDao demLifeCycleDao) {
	this.demLifeCycleDao = demLifeCycleDao;
    }

}
